<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>数据可视化图表展示</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 20px;
            background-color: #f5f5f5;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
        }

        h1 {
            text-align: center;
            color: #333;
        }

        .charts-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
            gap: 15px;
            margin-top: 20px;
        }

        .chart-container {
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            padding: 10px;
            text-align: center;
        }

        .chart-container h2 {
            margin-top: 0;
            color: #555;
            font-size: 1.1em;
        }

        .chart-img {
            max-width: 100%;
            height: auto;
        }

        @media (max-width: 768px) {
            .charts-grid {
                grid-template-columns: 1fr;
                gap: 10px;
            }

            .chart-container {
                padding: 8px;
            }

            .chart-container h2 {
                font-size: 1em;
            }
        }

        @media (min-width: 769px) and (max-width: 1024px) {
            .charts-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>数据可视化图表展示</h1>

        <div class="charts-grid">
            <div class="chart-container">
                <h2>柱状图</h2>
                <img src="data:image/png;base64,{{ plots.bar }}" alt="柱状图" class="chart-img">
            </div>

            <div class="chart-container">
                <h2>水平条形图</h2>
                <img src="data:image/png;base64,{{ plots.barh }}" alt="水平条形图" class="chart-img">
            </div>

            <div class="chart-container">
                <h2>饼图</h2>
                <img src="data:image/png;base64,{{ plots.pie }}" alt="饼图" class="chart-img">
            </div>

<!--            <div class="chart-container">-->
<!--                <h2>密度图</h2>-->
<!--                <img src="data:image/png;base64,{{ plots.kde }}" alt="密度图" class="chart-img">-->
<!--            </div>-->

            <div class="chart-container">
                <h2>散点图</h2>
                <img src="data:image/png;base64,{{ plots.scatter }}" alt="散点图" class="chart-img">
            </div>

            <div class="chart-container">
                <h2>箱型图</h2>
                <img src="data:image/png;base64,{{ plots.box }}" alt="箱型图" class="chart-img">
            </div>

            <div class="chart-container">
                <h2>面积图</h2>
                <img src="data:image/png;base64,{{ plots.area }}" alt="面积图" class="chart-img">
            </div>
        </div>
    </div>
</body>
</html>
